﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Empires.CRL.DataContract;
using Empires.BLL.Core.IService;
using Empires.BLL.Core.Implement;

namespace Empires.PL.ServiceClient
{
    public static class CompanyProductServiceClient
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="copName"></param>
        /// <param name="type">如果不存在类型分类设置，则为String.Empty</param>
        /// <param name="subject">如果不存在主题分类设置，则为String.Empty</param>
        /// <param name="page"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        public static List<DefaultDataPack> GetProductWithList(string copName, string type, string subject, int page, int size)
        {
            ICompanyProductService service = new CompanyProductService();
            return service.GetProductWithList(copName, type, subject, page, size);
        }
        public static List<DefaultDataPack> GetProductDetail(int pid)
        {
            ICompanyProductService service = new CompanyProductService();
            return service.GetProductDetail(pid);
        }

        public static bool ProductEdit(string id, ProductDataPack datapack)
        {
            ICompanyProductService service = new CompanyProductService();
            return service.ProductEdit(id, datapack);
        }

        public static bool ProductDelete(string copname, int pid)
        {
            ICompanyProductService service = new CompanyProductService();
            return service.ProductDelete(copname, pid);
        }

        public static bool ProductAdd(string copname, ProductDataPack productDataPack)
        {
            ICompanyProductService service = new CompanyProductService();
            return service.ProductAdd(copname,productDataPack);
        }
    }
}
